package com.lihan.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

@Data
public class PageResponse<T> {
    private List<T> data;
    private long total;

    // 构造方法
    public PageResponse(Page<T> page) {
        this.data = page.getRecords();
        this.total = page.getTotal();
    }
}